package com.arm.module.base;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by Baggio on 2018-8-10.
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BaseModule implements Serializable {

    /**
     * -1：有效-未领用
     */
    public static final Byte CERTIFICATE_STATUS_NOT_ACTIVATION = -1;
    /**
     * 0：无效-未领用
     */
    public static final Byte STATUS_UNVALID = 0;
    /**
     * 1:有效-已激活
     */
    public static final Byte STATUS_VALID = 1;

    /**
     * 2：使用中
     */
    public static final Byte STATUS_USEING = 2;

    /**
     * 3：已使用
     */
    public static final Byte STATUS_USERD = 3;

    /**
     * 3：待发货
     */
    public static final Byte PENDING_DELIVERY = 12;
    @ApiModelProperty(value="自增字段",required=false )
    private Long tid;
    /**
     * 状态（0：无效，1：有效）
     */
    @ApiModelProperty(value="状态（0：无效，1：有效）",example="1",required=false)
        private Byte status;
    @ApiModelProperty(value="操作人Id",required=false)
    private Long operatorId;
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value="创建时间",example="2019-01-01 11:25:32",required=false)
    private Date createTime;

    public Long getTid() {
        return tid;
    }

    public void setTid(Long tid) {
        this.tid = tid;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime == null ? new Date() : createTime;
    }
}
